<?php
require_once 'init-ise.php';
// should calc age of person ...
$format = "Y-m-d";
$person = PersonQuery::create()->findPk(1);
print "\n".$person;
$now = new DateTime();
$dob = $person->getBorn(null);
print "Now : ".$now->format($format)." Born on :".$dob->format($format)."\nAge is ".$now->diff($dob,true)->y;
print "\nFrom object: ".$person->getAge();
print "\nborn is before now? ".($now < $dob);
?>